package com.slkj.shilixiaoyuanapp.ui.user.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.slkj.shilixiaoyuanapp.R;
import com.slkj.shilixiaoyuanapp.SlxyApplication;
import com.slkj.shilixiaoyuanapp.base.ActivityInfo;
import com.slkj.shilixiaoyuanapp.base.BaseActivity;
import com.slkj.shilixiaoyuanapp.data.UserRequest;
import com.slkj.shilixiaoyuanapp.ui.user.LoginActivity;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

@ActivityInfo(layout = R.layout.set_up_activity, title = "我的设置")
public class SetUpActivity extends BaseActivity {
    @BindView(R.id.tv_name)
    TextView tvName;
    @Override
    protected void init() {
        tvName.setText(UserRequest.getInstance().getUser().getUser().getUName());
    }
    @OnClick({R.id.layout_phone, R.id.layout_password, R.id.layout_about, R.id.layout_fankui, R.id.tv_exit_login})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.layout_phone:
                startActivity(BangDingShouJiHaoActivity.class);
                break;
            case R.id.layout_password:
                startActivity(ChangePwdActivity.class);
                break;
            case R.id.layout_about:
                startActivity(AboutUsActivity.class);
                break;
            case R.id.layout_fankui:
                startActivity(YiJianFanKuiActivity.class);
                break;
            case R.id.tv_exit_login:
                UserRequest.getInstance().exitLogon();
                break;
        }
    }


}
